package cn.edu.gduf.luowowo.member.mapper;

import cn.edu.gduf.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectByPhone(String phone);

    UserInfo selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    int selectCountForConcern(Long id);

    int selectCountForFans(Long id);

    List<Long> selectConcernId(Long id);

    List<UserInfo> selectConcernByIds(List<Long> arry);

    int getCountForCoins(Long id);

    void updateHeadImg(@Param("headImg") String headImg, @Param("id") Long id);

    void focus(@Param("id") Long id, @Param("uid") Long uid);


    void updateCoinsNum(@Param("coins") int coins, @Param("id") Long id);

    List<String> getAllPhone();

    void updatePhone(@Param("phone") String phone, @Param("newMobile") String newMobile);
}